<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns= "http://www.w3.org/1999/xhtml" xml:lang= "en" lang= "en">
<head>
   <title>Admin Login</title>
</head>
<body>
	<?php
	/**
	* @package admin
	* @desc This file will create the admin sessions and deny normal users admin access.
	*/
		session_start();
		// Direct calling check
		if(!isset($_SESSION['role']))
		{
			header('Location: login.php');
			exit();
		}
		if ($_SESSION["role"] != "admin")
		{
			header('Location: login.php');
			exit();
		}
	?>
	<h1>Admin: 
	<?php
		echo $_SESSION["firstname"];
	?>
	</h1>
	
	<!-- display links for admin-->
	<a href = "parks.php">Parks</a>
	<a href = "findusers.php">Users and Admins</a>	
	<a href = "comments.php">Comments</a>
	<a href = "proposals.php">Proposals</a>
	<a href = "logout.php">Logout</a>
</body>
</html>